{extend name="default/base/base_home" /}

{block name="mall_main"}
<link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/index.css">
<script src="{$Think.PLUGINS_SITE_ROOT}/jquery.SuperSlide.2.1.1.js"></script>
<style>
    .mall_nav{border-bottom:none;}
    .mall_nav .all_categorys .mc{}
    .home-sale-layout .title{
        width: 100%;
        line-height: 58px;
        height: 58px;
        color: #333;
        font-size: 20px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    .left-top{
        height: 30px;
        float: left;
    }
    .layui-layer-title{
        display: none;
    }
    .layui-m-layercont{
        padding: 0 !important;
    }
    .layui-layer-dialog .layui-layer-content{
        padding: 0 !important;
    }
    .layui-layer-btn {
        display: none !important;
    }
    .layui-layer-content{
        height: auto !important;
    }
</style>
<div class="clear"></div>
<!-- HomeFocusLayout Begin-->
{sctaglib:advposition ap_id='1' key='ad_position'}
<div class="home-focus-layout" style="height: {$ad_position.ap_height}px;">
    <div class="bd">
        <ul>
            {sctaglib:adv ap_id='1' limit='10' item='v'}
            <li style="background: url({$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_ADV}/{$v.adv_code}) center top no-repeat rgb(35, 35, 35); display: none;background-color: {$v.adv_bgcolor|default=''}" style="{$v.adv_style|default=''}">
                <a href="{$v.adv_link}" target="{$v.adv_target}" title="{$v.adv_title}">&nbsp;</a>
            </li>
            {/sctaglib:adv}
        </ul>
    </div>
    <div class="hd">
        <ul>
            {sctaglib:adv ap_id='1' limit='10' item='v'}
            <li class=""></li>
            {/sctaglib:adv}
        </ul>
    </div>

</div>

{/sctaglib:advposition}
<!--HomeFocusLayout End-->

<div class="home-scroll main-adv-list">
    {sctaglib:adv ap_id='2' limit='100' item='v'}
    <div class="block-area" style="background: url({$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_ADV}/{$v.adv_code}) center top no-repeat; height: {$v.adv_height}px;">
        <div class="block-content">
            {foreach name="v.adv_links" item="val"}
            <a href="{$val}" target="{$v.adv_target}" title=""></a>
            {/foreach}
        </div>
    </div>
    {/sctaglib:adv}
</div>

<div class="wrapper mt10"></div>
<div class="index-link wrapper">
    <dl class="website">
        <dt>{$Think.lang.cooperative_partner} | {$Think.lang.friendship_link}<b></b></dt>
        <dd>
            {notempty name="link_list"}
            {foreach name="link_list" item="val"}
            <a href="{$val.link_url}" target="_blank" title="{$val.link_title}">{:str_cut($val.link_title,15)}</a>
            {/foreach}
            {/notempty}
        </dd>
    </dl>
</div>
<div class="footer-line"></div>
<!--首页底部保障开始-->

<!--首页底部保障结束-->
<!--StandardLayout Begin-->

<!--StandardLayout End-->




<script src="{$Think.PLUGINS_SITE_ROOT}/jquery.SuperSlide.2.1.1.js"></script>
<script>
    //轮播
    jQuery(".home-focus-layout").slide({mainCell: ".bd ul", autoPlay: true, delayTime: 500, interTime: 5000});
    jQuery(".home-scroll").slide({mainCell: ".bd li", autoPage: true,autoPlay: true, delayTime: 1000, effect: "left", interTime: 5000, vis: 5});
    jQuery(".home-sale-layout").slide({autoPlay: false, });
</script>

<script>
    $.ajax({
        url: '{:url('Index/adv')}',
        type: 'get',
        dataType: 'json',
        success: function(result) {
            console.log(result);
            if(result.adv_id){
                console.log(result);
                layer.open({
                    closeBtn: 1, //关闭按钮是否显示 1显示0不显示
                    content: '<a href="/'+ result.adv_link+'"><img width="100%" src="'+ result.adv_code+'"></a>'
                    , area: ['80%', 'auto']
                    // , btn: ['关闭']
                    // , yes: function (index) {
                    //     layer.close(index);
                    // },
                });
            }
        }
    });
</script>

{/block}